import { $gc } from 'gc-starter-ui-plus'

export function queryList(query) {
  return Request({
    url: '/bro/getBroList.do',
    method: 'post',
    params: query
  })
}

export function queryListQx(params = {}, flag = false) {
  return $gc.get(
    '/bro/getBroList',
    params,
    flag
  )
}

export function getList(params = {}, flag = false) {
  return $gc.get(
    '/bro/',
    params,
    flag
  )
}

export function addBro(data = {}, flag = false) {
  return $gc.post(
    '/bro',
    data,
    flag
  )
}

export function updateBro(data = {}, flag = false) {
  return $gc.put(
    '/bro',
    data,
    flag
  )
}

export function delBro(id, params = {}, flag = false) {
  return $gc.del(
    `/bro/${id}`,
    params,
    flag
  )
}

export function getBroInfo(id, params = {}, flag = false) {
  return $gc.get(
    `/bro/${id}`,
    params,
    flag
  )
}

export function checkRepeat(params = {}, flag = false) {
  return $gc.post(
    `/bro/repeat`,
    params,
    flag
  )
}
